 Ext.define('Era.view.EventForm',{
    extend: 'Ext.window.Window',
    alias: 'widget.eventform',
     
    //mode
    modal: false,
    closable: false,
    resizable: false,
    plain: true,
    border: false,
    bodyPadding: 10,
    hidden: false,
  
    items: [{
        xtype: 'form',
        
        defaults: {
            anchor: '100%',
            labelWidth: 100
        },
        width: 400,
        autoHeight: true,
        bodyPadding: 10,
        
        items: [
            {
                xtype: 'container',
                layout: 'hbox',
                items: [
                    {
                        xtype: 'textfield',
                        fieldLabel: 'Title',
                        name: 'title',
                        labelAlign: 'top'
                    },
                    {
                        xtype: 'iconfield'
                    }
                ]
            },        
            {
                xtype: 'textarea',
                labelAlign: 'top',
                fieldLabel: 'Description',
                name: 'description'
            },
            {
                xtype: 'fieldcontainer',
                layout: 'hbox',
                fieldLabel: 'Begins at',
                defaults: {
                    flex: 1,
                    hideLabel: true
                },
                items: [               
                    {
                        xtype: 'datefield',
                        format: 'm-d-Y',
                        fieldLabel: 'startDate',
                        name: 'start_date'
                    }
                ]
            }  
        ],

        buttons: [
            {
                text: 'Submit',
                action: 'submit'
            },
            {
                text: 'Cancel',
                action: 'cancel'  
            }
        ]
    }]
});

